package com.meta;

import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.11.0)",
    comments = "Source: HtMetaInfoSync.proto")
public final class HtMetaInfoSyncServiceGrpc {

  private HtMetaInfoSyncServiceGrpc() {}

  public static final String SERVICE_NAME = "com.ht.meta.HtMetaInfoSyncService";

  // Static method descriptors that strictly reflect the proto.
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  @java.lang.Deprecated // Use {@link #getSyncMetaMethod()} instead. 
  public static final io.grpc.MethodDescriptor<com.meta.HtMetaSyncRequest,
      com.meta.HtMetaSyncResponse> METHOD_SYNC_META = getSyncMetaMethodHelper();

  private static volatile io.grpc.MethodDescriptor<com.meta.HtMetaSyncRequest,
      com.meta.HtMetaSyncResponse> getSyncMetaMethod;

  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static io.grpc.MethodDescriptor<com.meta.HtMetaSyncRequest,
      com.meta.HtMetaSyncResponse> getSyncMetaMethod() {
    return getSyncMetaMethodHelper();
  }

  private static io.grpc.MethodDescriptor<com.meta.HtMetaSyncRequest,
      com.meta.HtMetaSyncResponse> getSyncMetaMethodHelper() {
    io.grpc.MethodDescriptor<com.meta.HtMetaSyncRequest, com.meta.HtMetaSyncResponse> getSyncMetaMethod;
    if ((getSyncMetaMethod = HtMetaInfoSyncServiceGrpc.getSyncMetaMethod) == null) {
      synchronized (HtMetaInfoSyncServiceGrpc.class) {
        if ((getSyncMetaMethod = HtMetaInfoSyncServiceGrpc.getSyncMetaMethod) == null) {
          HtMetaInfoSyncServiceGrpc.getSyncMetaMethod = getSyncMetaMethod = 
              io.grpc.MethodDescriptor.<com.meta.HtMetaSyncRequest, com.meta.HtMetaSyncResponse>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(
                  "com.ht.meta.HtMetaInfoSyncService", "syncMeta"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.meta.HtMetaSyncRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.meta.HtMetaSyncResponse.getDefaultInstance()))
                  .setSchemaDescriptor(new HtMetaInfoSyncServiceMethodDescriptorSupplier("syncMeta"))
                  .build();
          }
        }
     }
     return getSyncMetaMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static HtMetaInfoSyncServiceStub newStub(io.grpc.Channel channel) {
    return new HtMetaInfoSyncServiceStub(channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static HtMetaInfoSyncServiceBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    return new HtMetaInfoSyncServiceBlockingStub(channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static HtMetaInfoSyncServiceFutureStub newFutureStub(
      io.grpc.Channel channel) {
    return new HtMetaInfoSyncServiceFutureStub(channel);
  }

  /**
   */
  public static abstract class HtMetaInfoSyncServiceImplBase implements io.grpc.BindableService {

    /**
     */
    public void syncMeta(com.meta.HtMetaSyncRequest request,
        io.grpc.stub.StreamObserver<com.meta.HtMetaSyncResponse> responseObserver) {
      asyncUnimplementedUnaryCall(getSyncMetaMethodHelper(), responseObserver);
    }

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getSyncMetaMethodHelper(),
            asyncUnaryCall(
              new MethodHandlers<
                com.meta.HtMetaSyncRequest,
                com.meta.HtMetaSyncResponse>(
                  this, METHODID_SYNC_META)))
          .build();
    }
  }

  /**
   */
  public static final class HtMetaInfoSyncServiceStub extends io.grpc.stub.AbstractStub<HtMetaInfoSyncServiceStub> {
    private HtMetaInfoSyncServiceStub(io.grpc.Channel channel) {
      super(channel);
    }

    private HtMetaInfoSyncServiceStub(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected HtMetaInfoSyncServiceStub build(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      return new HtMetaInfoSyncServiceStub(channel, callOptions);
    }

    /**
     */
    public void syncMeta(com.meta.HtMetaSyncRequest request,
        io.grpc.stub.StreamObserver<com.meta.HtMetaSyncResponse> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(getSyncMetaMethodHelper(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   */
  public static final class HtMetaInfoSyncServiceBlockingStub extends io.grpc.stub.AbstractStub<HtMetaInfoSyncServiceBlockingStub> {
    private HtMetaInfoSyncServiceBlockingStub(io.grpc.Channel channel) {
      super(channel);
    }

    private HtMetaInfoSyncServiceBlockingStub(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected HtMetaInfoSyncServiceBlockingStub build(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      return new HtMetaInfoSyncServiceBlockingStub(channel, callOptions);
    }

    /**
     */
    public com.meta.HtMetaSyncResponse syncMeta(com.meta.HtMetaSyncRequest request) {
      return blockingUnaryCall(
          getChannel(), getSyncMetaMethodHelper(), getCallOptions(), request);
    }
  }

  /**
   */
  public static final class HtMetaInfoSyncServiceFutureStub extends io.grpc.stub.AbstractStub<HtMetaInfoSyncServiceFutureStub> {
    private HtMetaInfoSyncServiceFutureStub(io.grpc.Channel channel) {
      super(channel);
    }

    private HtMetaInfoSyncServiceFutureStub(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected HtMetaInfoSyncServiceFutureStub build(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      return new HtMetaInfoSyncServiceFutureStub(channel, callOptions);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture<com.meta.HtMetaSyncResponse> syncMeta(
        com.meta.HtMetaSyncRequest request) {
      return futureUnaryCall(
          getChannel().newCall(getSyncMetaMethodHelper(), getCallOptions()), request);
    }
  }

  private static final int METHODID_SYNC_META = 0;

  private static final class MethodHandlers<Req, Resp> implements
      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final HtMetaInfoSyncServiceImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(HtMetaInfoSyncServiceImplBase serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_SYNC_META:
          serviceImpl.syncMeta((com.meta.HtMetaSyncRequest) request,
              (io.grpc.stub.StreamObserver<com.meta.HtMetaSyncResponse>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  private static abstract class HtMetaInfoSyncServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    HtMetaInfoSyncServiceBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return com.meta.HtMetaInfoSyncProto.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("HtMetaInfoSyncService");
    }
  }

  private static final class HtMetaInfoSyncServiceFileDescriptorSupplier
      extends HtMetaInfoSyncServiceBaseDescriptorSupplier {
    HtMetaInfoSyncServiceFileDescriptorSupplier() {}
  }

  private static final class HtMetaInfoSyncServiceMethodDescriptorSupplier
      extends HtMetaInfoSyncServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    HtMetaInfoSyncServiceMethodDescriptorSupplier(String methodName) {
      this.methodName = methodName;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (HtMetaInfoSyncServiceGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new HtMetaInfoSyncServiceFileDescriptorSupplier())
              .addMethod(getSyncMetaMethodHelper())
              .build();
        }
      }
    }
    return result;
  }
}
